//------------------------------------------------------------------------
// <copyright file="BaseControl.cs" company="DevDir">
//   Copyleft (c) DevDir. No rights reserved.
// </copyright>
// <author>Nikita Sharov</author>
//------------------------------------------------------------------------

namespace DevDir.Mp3.Equilibrist.Controls
{
  using System.Drawing;
  using System.ComponentModel;
  using System.Windows.Forms;
  
  public partial class BaseControl : UserControl
  {
    public BaseControl()
    {
      InitializeComponent();
    }

    public void SetUp(DataGridView dataGridView)
    {
      DataGridViewCellStyle dataGridViewCellStyle1 = 
        new DataGridViewCellStyle();
      DataGridViewCellStyle dataGridViewCellStyle2 = 
        new DataGridViewCellStyle();

      ((ISupportInitialize)(dataGridView)).BeginInit();
      dataGridView.AllowUserToAddRows = false;
      dataGridViewCellStyle1.BackColor = Color.FromArgb(
        ((int)(((byte)(224)))), 
        ((int)(((byte)(224)))), 
        ((int)(((byte)(224)))));
      dataGridViewCellStyle1.NullValue = "--";
      dataGridView.AlternatingRowsDefaultCellStyle = 
        dataGridViewCellStyle1;
      dataGridView.CellBorderStyle = 
        DataGridViewCellBorderStyle.SingleHorizontal;
      dataGridView.ColumnHeadersHeightSizeMode = 
        DataGridViewColumnHeadersHeightSizeMode.AutoSize;
      dataGridView.ReadOnly = true;
      dataGridView.RowHeadersVisible = false;
      dataGridViewCellStyle2.NullValue = "--";
      dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle2;
      dataGridView.SelectionMode = 
        DataGridViewSelectionMode.FullRowSelect;
      ((ISupportInitialize)(dataGridView)).EndInit();
    }
  }
}
